#include "FunctorLine.h"

template <class T>
FunctorLine<T>::FunctorLine(T *object):mObject(object)
{
}

template <class T>
        void FunctorLine<T>::appendFunction(QLine (T::*function)(Cell *,int,Cell **))
{
    mFunctions.append(function);
}

template <class T>
QLine FunctorLine<T>::operator()(Cell *pCell,int nAdjacentCellLineAddedCount, Cell **pNextCell,int indFunction)
{
    return (mObject->*(mFunctions.at(indFunction)))(pCell,nAdjacentCellLineAddedCount,pNextCell);
}

template <class T>
QLine FunctorLine<T>::Call(Cell *pCell,int nAdjacentCellLineAddedCount, Cell **pNextCell,int indFunction)
{
    return (*mObject.*(mFunctions.at(indFunction)))(pCell,nAdjacentCellLineAddedCount,pNextCell);
}
